package com.wss.day02.test04;

/**
 * @author wangshaoshuai
 * @desc TODO
 * @date 2025/4/21
 */
public class Test04 {
    public static void main(String[] args) {
        Person man1 = new Person("张三", 25, true);
        Person woman1 = new Person("李四", 23, false);
        Person man2 = new Person("王五", 30, true);
        Person woman2 = new Person("赵六", 21, false);
        Person man3 = new Person("钱七", 22, true);
        Person woman3 = new Person("孙八", 22, false);

        System.out.println("正常结婚");
        man1.marry(woman1);

        System.out.println("同性结婚");
        man1.marry(man2);

        System.out.println("年龄不足");
        man3.marry(woman2);

        System.out.println("一方已婚");
        man2.marry(woman1);

        System.out.println("和自己结婚");
        woman3.marry(woman3);

        System.out.println("正常结婚2");
        man3.marry(woman3);
    }
    }

